<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <!-- 遍历数组-->
    <ul>
        <li v-for="(item,index) in persons" :key="index">{{item}}</li>
    </ul>
    <!--遍历对象-->
    <ul>
        <li v-for="(value,key,index) in person">{{key}}:{{value}}-{{index}}</li>
    </ul>
    <!--of的形式遍历对象-->
    <ul>
        <li v-for="(value,key,index) of person">{{key}}:{{value}}-{{index}}</li>
    </ul>
    <!--遍历字符串-->
    <ul>
        <li v-for="(str,index) in message">{{str}}-{{index}}</li>
    </ul>
    <!--遍历指定数字-->
    <ul>
        <li v-for="(num,index) in 10">{{num}}</li>
    </ul>
</div>
<script src="../js/vue.js"></script>
<script>

    const app = Vue.createApp({
        data() {
            return {
                persons: ['马云', '莫斯科', '茂喔'],
                person: {
                    name: "陶品奇",
                    age: 22,
                    height: 180,
                },
                message: "helloVue3"
            }
        },

    })
    app.mount("#app")
</script>
</body>
</html>
